package org.example.lys.stream;

import java.util.ArrayList;
import java.util.List;

/**
 * @author liyishan
 * @date 2023/6/21 14:18
 * @apiNote
 */

public class testBasic01 {
    public static void main(String[] args) {
        List<Integer> ids = build();
        test2(ids);
    }

    private static void test1(List<Integer> ids){
        long count = ids.stream().distinct().count();
        System.out.println(count);
    }

    private static void test2(List<Integer> ids){
        Boolean flag= ids.stream().anyMatch(id -> id % 2 == 0);
        System.out.println(flag);
    }
    private static List<Integer> build(){
        List<Integer> ids = new ArrayList<>();
        ids.add(1);
        ids.add(2);
        ids.add(4);
        return ids;
    }

}
